using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace PBR
{
    /// <summary>
    /// A TabPage that holds a UserControl
    /// </summary>
    public partial class Tab : TabPage
    {
        /// <summary>
        /// The User Control that the tab contains,
        ///     the tab itself is blank
        /// </summary>
        public UserControl content;

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="content">The control to add</param>
        /// <param name="text">The tab name</param>
        public Tab(UserControl content, string text)
        {
            InitializeComponent();

            this.content = content;
            this.Text = text;
            this.Controls.Add(content);
            this.AutoScroll = true;
            content.Dock = DockStyle.Fill;
        }
    }
}
